/*
* 数据分析
* */
import http from "../http";
import httpComputed from "../httpComputed";   // 端口号更改的时间分析


//  数据概览
const dataCard = {
	// 概览
	overviewNavigate: (params) => http({ method: 'post', url: '/behavior/overview-group/navigate', data: params }),
	// 概览
	overviewList: (params) => http({ method: 'post', url: '/behavior/overview/list', data: params }),
	overviewAdd: (params) => http({ method: 'post', url: '/behavior/overview/add', data: params }),
	overviewUpdate: (params) => http({ method: 'post', url: '/behavior/overview/update', data: params }),
	overviewDelete: (params) => http({ method: 'post', url: '/behavior/overview/delete', data: params }),
	// 概览分组
	overviewGroupList: (params) => http({ method: 'post', url: '/behavior/overview-group/list', data: params }),
	overviewGroupAdd: (params) => http({ method: 'post', url: '/behavior/overview-group/add', data: params }),
	overviewGroupUpdate: (params) => http({ method: 'post', url: '/behavior/overview-group/update', data: params }),
	overviewGroupDelete: (params) => http({ method: 'post', url: '/behavior/overview-group/delete', data: params }),
	// 概览组件(面板)
	overviewComponentQuery: (params) => http({ method: 'post', url: '/behavior/overview-component/query', data: params }),
	overviewComponentList: (params) => http({ method: 'post', url: '/behavior/overview-component/list', data: params }),
	overviewComponentDelete: (params) => http({ method: 'post', url: '/behavior/overview-component/delete', data: params }),   //书签删除
	overviewComponentRelationDelete: (params) => http({ method: 'post', url: '/behavior/overview-component-relation/delete', data: params }),   //概览删除
	overviewComponentUpdate: (params) => http({ method: 'post', url: '/behavior/overview-component/update', data: params }),
}


// 事件分析
const eventAnalysis = {

// 事件分组 分组查询
	eventGroupQuery: (params) => http({ method: 'post', url: '/behavior/meta/event/group/list', data: params }),
// 事件分组 添加分组
	eventGroupAdd: (params) => http({ method: 'post', url: '/behavior/meta/event/group/add', data: params }),
// 事件分组 移动分组
	eventGroupMobile: (params) => http({ method: 'post', url: '/behavior/meta/event/group/mobile', data: params }),
// 事件分组 删除分组
	eventGroupDelete: (params) => http({ method: 'post', url: '/behavior/meta/event/group/delete', data: params }),
// 事件分组 分组改名
	eventGroupUpdatebyname: (params) => http({ method: 'post', url: '/behavior/meta/event/group/update', data: params }),
// 事件分析，保存到概览
	overviewComponentAdd: (params) => http({ method: 'post', url: '/behavior/overview-component/add', data: params }),
// 事件分析，级联组件，第一列可选值更改
	eventAnalysisPropertyList: (params) => http({ method: 'post', url: '/behavior/event-analysis-property/list', data: params }),
// 事件分析，级联组件，第三列可选值更改
	metaPropertyDictionaryList: (params) => http({ method: 'post', url: '/behavior/meta-property/dictionaryList', data: params }),
// 事件分析，报告查询
	computeEventReport: (params) => httpComputed({ method: 'post', url: '/compute/event/report', data: params }),
}


//  用户分群
const userAnalysis = {
	// 分群列表查询
	userGroupList: (params) => http({ method: 'post', url: '/behavior/user-group/list', data: params }),
	// 分群ID生成接口
	userGroupSeqid: (params) => http({ method: 'post', url: '/behavior/user-group/seqid', data: params }),
	// 分群创建接口
	userGroupAdd: (params) => http({ method: 'post', url: '/behavior/user-group/add', data: params }),
	// 分群修改接口
	userGroupUpdate: (params) => http({ method: 'post', url: '/behavior/user-group/update', data: params }),
	// 分群详情查询
	userGroupQuery: (params) => http({ method: 'post', url: '/behavior/user-group/query', data: params }),
	// 分群删除
	userGroupDelete: (params) => http({ method: 'post', url: '/behavior/user-group/delete', data: params }),
	// 分群历史详情查询
	userGroupHistory: (params) => http({ method: 'post', url: '/behavior/user-group/history', data: params }),
	// 分群历史刷新 重新计算
	userGroupHistoryUpdate: (params) => http({ method: 'post', url: '/behavior/user-group/history/update', data: params }),
	// 属性查询接口
	userPropertyList: (params) => http({ method: 'post', url: '/behavior/user-group-property/list', data: params }),
	// 用户分群预估接口
	userGroupReportEstimate: (params) => http({ method: 'post', url: '/behavior/user-group/report/estimate', data: params }),
}

const analysisApi = {
    dataCard,
    eventAnalysis,
    userAnalysis
}
export default analysisApi;
